package com.henry.imkit.models

import com.henry.imkit.IMEvent
import java.io.Serializable

data class ConversationData(
    var eacgid: String? = null,
    var unreadtotals: Int = 0,
    var eacgname: String? = null,
    var eacgtype: String? = "",
    var eacgheadportrait: String? = null,
    var eacgmistop: Boolean = false,
    var eacgexpandid: String? = null,  // avchat里的原会话
    var eacglastmsgtime: Long = 0,
    var eacglastmsg: String? = null,
    var eacgdescription: String? = null,
    var eacgmisignore: String? = null,
    var eacgmstate: String? = null,
    var eacgnotification: String? = null,
) : Serializable

data class User(
    val userid: String = "",
    val uname: String = "",
    val uaccount: String = "",
    val usex: String = "",
    val uheadportrait: String? = "",
    var unable: Boolean = false,
    var isSelected: Boolean = false,
    var sortLetters: String = "", // 显示数据拼音的首字母
)

data class ConversationDetail(
    val eacgcreatetime: String?,
    val eacgdescription: String?,
    val eacgexpandid: String?,
    val eacgheadportrait: String?,
    val eacgid: String?,
    val eacgisdelete: String?,
    val eacgkey: String?,
    val eacglastmsg: String?,
    val eacglastmsgname: String?,
    val eacglastmsgtime: String?,
    val eacgname: String?,
    val eacgnotification: String?,
    val eacgownerid: String?,
    val eacgownerman: String?,
    val eacgrenameflag: String?,
    val eacgseq: String?,
    val eacgsourceid: String?,
    val eacgtype: String?,
    val ownFlag: Boolean = false,
)

data class Member(
    val eacgmcommon: String? = "",
    val eacgmexpanddata: String? = "",
    val eacgmgimd: String? = "",
    val eacgmheadportrait: String? = "",
    val eacgmid: String? = "",
    val eacgmisignore: String? = "",
    val eacgmistop: String? = "",
    val eacgmjointime: String? = "",
    val eacgmreadableseq: String? = "",
    val eacgmreadedseq: String? = "",
    val eacgmremark: String? = "",
    val eacgmremarkgroup: String? = "",
    val eacgmrole: String? = "",
    val eacgmuid: String? = "",
    val eacgmuname: String? = "",

    var isSelected: Boolean? = false, // 选中
    var unable: Boolean? = false, // 不能选择
    var isSelectedBackground: Boolean? = null, // 选择背景
    var isShowDelete: Boolean = false,
) : Serializable

data class Friend(
    val userid: String?,
    val fremark: String?,
    val uname: String?,
    val uaccount: String?,
    val usex: String?,
    val uheadportrait: String?,
)

data class MessageContent(
    val type: String?,
    val customtype: String?,
    val time: String?,
    val content: String?,
    val flowid: String?,
    val flowname: String?,
    val mid: String?,
    val msgid: String?,
    val msgtype: String?,
    val navigateurl: String?,
    val patname: String?,
    val readtime: String?,
    val subject: String?,
    val techstudyid: String?,
    val xpapertype: String?,
)

data class IMChatData(
    var chatNotices: List<IMChatNotice>? = null,
    var chatRTCNotices: List<IMChatNotice>? = null,
    var status: Boolean? = false,
    var msg: String? = null,
    var informationcode: Int? = null,
    var taskid: String? = null
)

data class IMChatNotice(
    var eacgid: String? = "",
    var unreadtotals: Int = 0,
    var newMessages: List<MessageData>? = null,
    var newEvents: List<IMEvent>? = null,
    var eacgname: String? = "",
    var eacgtype: String? = "",
    var eacgheadportrait: String? = "",
    val eacgmistop: Boolean = false,
    var eacgexpandid: String? = "", // avchat里的原会话
    var chatNoticeType: String? = "",
    var eacglastmsgtime: Long = 0,
    var eacglastmsg: String? = "",
)

data class MessageData(
        val eamid: String?,
        val eamtimestamp: Long, // 毫秒
        val eamfromid: String?,
        val eamfromname: String?,
        val eamfromheadportrait: String?,
        val eamtoid: String?,
        val eamseq: String?,
        val eamrandom: String?,
        val eamessagetype: String?,
        val eamreadlogtime: String?,
        val eamessagecontent: String?,
)

data class DomainData(
    val domain: String,
    val host: String,
    val path: String,
    val port: String,
    val protocol: String,
)